<?php
session_start();
?>
<html>
<head>


<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" src="pupdate.js"></script>
<script type="text/javascript">
function checkData ()
      {
			
             if (document.reservation.codeproduct.value == "") {
                        alert("Please insert your codeproduct!.");
                        document.reservation.codeproduct.focus();
						return false;
                        
             }
//             if (document.reservation.email.value == "") {
//                        alert("Please insert your email!.")
//                        document.reservation.email.focus();
//                        
//             }
//			 if (document.reservation.address.value == "") {
//                        alert("Please insert your address!.")
//                        document.reservation.address.focus();
//                        return false();
//			}
//			  if (document.reservation.reservationdate.value == "") {
//                        alert("Please insert your reservationdate!.")
//                        document.reservation.reservationdate.focus()
//                        return false
//			 	}
//			  if (document.reservation.category.value == "") {
//                        alert("Please insert your category of product!.")
//                        document.reservation.address.focus()
//                        return false
//				}		
//			  if (document.reservation.kind.value == "") {
//                        alert("Please insert your kind of product!.")
//                        document.reservation.kind.focus()
//                        return false				
//             }			   
		}	 
</script>
</head>

<body bgcolor="#0099FF">
<?php      

include("../../MerchandiseBay/conn.php");

$reservationdate="";
//$kind="";
//$regno="";
//$comment="";

if(isset($_REQUEST['reservationdate']))
 {
  $reservationdate=$_REQUEST['reservationdate'];
 // $kind=$_REQUEST['kind'];
  //$regno=$_REQUEST['regno'];
  //$comment=$_REQUEST['comment'];
  
  $whr="reservationdate='00000000'";
  
  if($reservationdate!="")
    {$whr=$whr." and reservationdate like '%$reservationdate%'";}
    
  //if(($kind!="")&&($whr==""))
    //{$whr="kind like '%$kind%'";}
  //if(($kind!="")&&($whr!=""))
    //{$whr=$whr." and kind like '%$kind%'";}  
  //regno     
  //if(($regno!="")&&($whr==""))
    //{$whr="regno like '%$regno%'";}
  //if(($regno!="")&&($whr!=""))
    //{$whr=$whr." and regno like '%$regno%'";} 
    
  //if(($comment!="")&&($whr==""))
    //{$whr="comment like '%$comment%'";}
  //if(($comment!="")&&($whr!=""))
    //{$whr=$whr." and comment like '%$comment%'";} 
  
  //if($whr=="")
     //{$sqlMerchandise="select * from merchandise";}
   else  
    {$sqlReservation="select * from reservation where $whr";}
  $qryReservationdate=mysql_query($sqlReservationdate,$conn);
  
 }
else{$search="none";}
?>

<form name="reservation" method="post" action="queue.php">
  <table width="400" height="202" border="0" cellpadding="0" cellspacing="0">
    <tr> 
      <td height="33" colspan="2">&nbsp;</td>
    </tr>
    <tr> 
      <td width="34%" height="32"><div align="right"></div></td>
      <td width="66%">&nbsp;</td>
    </tr>
    <tr> 
      <td height="35"><div align="right"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr> 
      <td height="32"><div align="right"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr> 
      <td height="70"><div align="right"> 
          <p>&nbsp;</p>
          <p>&nbsp;</p>
        </div></td>
      <td><p>&nbsp;</p></td>
    </tr>

  </table>
  
  <p>&nbsp;</p>
  <table width="378" height="407" border="0" cellpadding="0" cellspacing="0">


    <tr>
      <td height="23" colspan="2"><p><strong><font color="#FFFF00">Reservation 
        Information</font></strong></p></td>
    </tr>
    <tr>
      <td width="43%" height="22"><div align="right"><font color="#FF6600"><strong>Choose Your Reservation 
      Date </strong></font></div></td>
      <td width="57%"><font face="Verdana">
        <input type=text id=reservationdate name="reservationdate" onFocus="document.reservation.button1.focus()">
      </font></td>
    </tr>
    <tr>
      <td height="24"><div align="right"><font color="#FF6600"></font></div></td>
      <td><font face="Verdana">
        <input type="button" value="choose date" name="button12" onClick="getCalendarFor(document.reservation.reservationdate)">
      </font></td>
    </tr>
    <tr>
      <td height="31"><div align="right"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td height="31"><div align="right"><font color="#FF6600"><strong>
        <input type="submit" name="Submit3" value="Submit">
      </strong></font></div></td>
      <td><input type="reset" name="Submit22" value="Reset"></td>
    </tr>
    <tr>
      <td height="22"><div align="right"></div></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
  </table>
  <table border="0" width="100%" id="table2">
        <?if(isset($_REQUEST['reservationdate'])) {?>
        <tr> 
          <td width="176" valign="top" bgcolor="#333333"><strong><font size="1" face="Verdana">Code Product
          </font></strong></td>
          <td width="169" bgcolor="#333333" valign="top"><b> <font size="2" face="Verdana"><strong><font size="1" face="Verdana">Category</font></strong></font></b></td>
          <td width="162" bgcolor="#333333" valign="top"><div align="left"><font size="1"><strong><b><font face="Verdana">Kind</font></b></strong></font></div></td>
          <td width="295" bgcolor="#333333" valign="top"><div align="center"><font size="1"><b> 
              <font face="Verdana">Status</font></b></font></div></td>
          <td bgcolor="#333333" valign="top" width="126"><div align="center"><font size="1"><strong>Process</strong></font></div></td>
        </tr>
        <? while($rowReservationdate=mysql_fetch_assoc($qryReservationdate)){?>
        <tr> 
          <td valign="top"><font face="Verdana" size="1" color="#FFFFFF">&nbsp;
            <?=$rowReservationdate['reservationdate']?>
          </font></td>
          <td width="169" valign="top"> <font face="Verdana" size="1" color="#FFFFFF">&nbsp; 
            <?=$rowReservationdate['category']?>
            </font></td>
          <td width="162" valign="top"> <font size="1" face="Verdana" color="#FFFFFF"> 
            <?=$rowReservationdate['kind']?>
            </font></td>
          <td width="295" valign="top"> <font size="1" face="Verdana" color="#FFFFFF"> 
            <?=$rowReservationdate['status']?>
            </font></td>
		  <td width="295" valign="top"> <font size="1" face="Verdana" color="#FFFFFF"> 
            <?=$rowReservationdate['accept']?>
            </font></td>
		  </tr>
        <?}
			if(mysql_num_rows($qryReservationdate)==0) {?>
        <tr> 
          <td colspan="5"> <p align="center"><b> <font size="3" face="Verdana" color="#FFFFFF">&nbsp;The 
              informatian of</font><font size="2" face="Verdana" color="#FF0000"> 
              <?=$reservationdate?>
              </font><font size="3" face="Verdana" color="#FFFFFF"> that you search are
              not available </font></b></td>
        </tr>
        <?}?>
      </table>
  </form>
<?}?>
<p>&nbsp;<!-- PopUp Calendar BEGIN -->
<script language="JavaScript">
if (document.all) {
 document.writeln("<div id=\"PopUpCalendar\" style=\"position:absolute; left:0px; top:0px; z-index:7; width:200px; height:77px; overflow: visible; visibility: hidden; background-color: #FFFFFF; border: 1px none #000000\" onMouseOver=\"if(ppcTI){clearTimeout(ppcTI);ppcTI=false;}\" onMouseOut=\"ppcTI=setTimeout(\'hideCalendar()\',500)\">");
 document.writeln("<div id=\"monthSelector\" style=\"position:absolute; left:0px; top:0px; z-index:9; width:181px; height:27px; overflow: visible; visibility:inherit\">");}
else if (document.layers) {
 document.writeln("<layer id=\"PopUpCalendar\" pagex=\"0\" pagey=\"0\" width=\"200\" height=\"200\" z-index=\"100\" visibility=\"hide\" bgcolor=\"#FFFFFF\" onMouseOver=\"if(ppcTI){clearTimeout(ppcTI);ppcTI=false;}\" onMouseOut=\"ppcTI=setTimeout('hideCalendar()',500)\">");
 document.writeln("<layer id=\"monthSelector\" left=\"0\" top=\"0\" width=\"181\" height=\"27\" z-index=\"9\" visibility=\"inherit\">");}
else {
 document.writeln("<p><font color=\"#FF0000\"><b>Error ! The current browser is either too old or too modern (usind DOM document structure).</b></font></p>");}
</script>
<noscript><p><font color="#FF0000"><b>JavaScript is not activated !</b></font></p></noscript>
<table border="1" cellspacing="1" cellpadding="2" width="200" bordercolorlight="#000000" bordercolordark="#000000" vspace="0" hspace="0"><form name="ppcMonthList"><tr><td align="center" bgcolor="#CCCCCC"><a href="javascript:moveMonth('Back')" onMouseOver="window.status=' ';return true;"><font face="Arial, Helvetica, sans-serif" size="2" color="#000000"><b>&lt;&nbsp;</b></font></a><font face="MS Sans Serif, sans-serif" size="1"> 
<select name="sItem" onMouseOut="if(ppcIE){window.event.cancelBubble = true;}" onChange="switchMonth(this.options[this.selectedIndex].value)" style="font-family: 'MS Sans Serif', sans-serif; font-size: 9pt"><option value="0" selected>2000 &#149; January</option><option value="1">2000 &#149; February</option><option value="2">2000 &#149; March</option><option value="3">2000 &#149; April</option><option value="4">2000 &#149; May</option><option value="5">2000 &#149; June</option><option value="6">2000 &#149; July</option><option value="7">2000 &#149; August</option><option value="8">2000 &#149; September</option><option value="9">2000 &#149; October</option><option value="10">2000 &#149; November</option><option value="11">2000 &#149; December</option><option value="0">2001 &#149; January</option></select></font><a href="javascript:moveMonth('Forward')" onMouseOver="window.status=' ';return true;"><font face="Arial, Helvetica, sans-serif" size="2" color="#000000"><b>&nbsp;&gt;</b></font></a></td></tr></form></table>
<table border="1" cellspacing="1" cellpadding="2" bordercolorlight="#000000" bordercolordark="#000000" width="200" vspace="0" hspace="0"><tr align="center" bgcolor="#CCCCCC"><td width="20" bgcolor="#FFFFCC"><b><font face="MS Sans Serif, sans-serif" size="1">Su</font></b></td><td width="20"><b><font face="MS Sans Serif, sans-serif" size="1">Mo</font></b></td><td width="20"><b><font face="MS Sans Serif, sans-serif" size="1">Tu</font></b></td><td width="20"><b><font face="MS Sans Serif, sans-serif" size="1">We</font></b></td><td width="20"><b><font face="MS Sans Serif, sans-serif" size="1">Th</font></b></td><td width="20"><b><font face="MS Sans Serif, sans-serif" size="1">Fr</font></b></td><td width="20" bgcolor="#FFFFCC"><b><font face="MS Sans Serif, sans-serif" size="1">Sa</font></b></td></tr></table>

	
<script language="JavaScript">
if (document.all) {
 document.writeln("</div>");
 document.writeln("<div id=\"monthDays\" style=\"position:absolute; left:0px; top:52px; z-index:8; width:200px; height:17px; overflow: visible; visibility:inherit; background-color: #FFFFFF; border: 1px none #000000\">&nbsp;</div></div>");}
else if (document.layers) {
 document.writeln("</layer>");
 document.writeln("<layer id=\"monthDays\" left=\"0\" top=\"52\" width=\"200\" height=\"17\" z-index=\"8\" bgcolor=\"#FFFFFF\" visibility=\"inherit\">&nbsp;</layer></layer>");}
else {/*NOP*/}
</script>
<!-- PopUp Calendar END --></p>

</body>
</html>
